﻿using Microsoft.AspNetCore.Mvc.Filters;

namespace WebAppFilterDemo.FilterExt
{
    /// <summary>
    /// 资源过滤器
    //  可以通过Resource Filter 进行资源缓存、防盗链等操作。
    /// </summary>
    public class ResourceFilter : Attribute, IResourceFilter
    {
        public void OnResourceExecuted(ResourceExecutedContext context)
        {
            Console.WriteLine("ResourceFilter - OnResourceExecuted");
        }

        public void OnResourceExecuting(ResourceExecutingContext context)
        {
            Console.WriteLine("ResourceFilter - OnResourceExecuting");
        }
    }
}
